package com.belf.console.agent.migrate.job;

import com.alibaba.fastjson2.JSONObject;
import com.belf.console.agent.migrate.JobPush;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


/**
 * JobManage
 *
 * @author l
 * @since 2024/8/9 14:19
 */

public class JobManageTask {
    private static final Logger logger = LoggerFactory.getLogger(JobManageTask.class.getName());
    /**
     *  连接引擎获取数据
     * @param APIPath
     * @param paramJson
     * @return
     */
    public static JSONObject manageJob(String APIPath,JSONObject paramJson){
        if(paramJson != null){
            try {
                String jsonString = JSONObject.toJSONString(paramJson);
                return JobPush.pushJobManage(APIPath,jsonString);
            } catch (Exception e) {
                logger.error("数据源信息 连接测试失败",e);
            }
        }
        return null;
    }
}
